/**
 * 
 */
package com.roc.util.constant;

import org.apache.commons.lang3.StringUtils;

/**
 * @author RenPengFei 2013-5-18 下午6:32:41
 */
public enum SysLogType {
	 OPERATORS_ADD("添加操作员", "001"),
	 OPERATORS_UPDATE("操作员信息修改", "002"),
	 OPERATORS_DELAY_DATE("延长有效期", "003"),
	 OPERATORS_DELETE("删除操作员", "004"),
	 OPERATORS_CANCEL("注销操作员", "005"),
	 OPERATORS_RECOVER("恢复操作员", "016"),
	 OPERATORS_AUDITING("操作员审核", "006"),
	 AGENT_AUDITING("代理商初审", "007"),
	 AGENT_RE_AUDITING("代理商复审", "008"),
	 MERCHANT_ADD("商户录入", "009"),
	 MERCHANT_INFO_CHANGE("商户基本信息变更", "010"),
	 MERCHANT_AUDITING("特约商户初审", "011"),
	 MERCHANT_INFO_COMPLETE("完善驳回的商户信息", "060"),
	 MERCHANT_RE_AUDITING("特约商户复审", "012"),
	 MERCHANT_LAST_AUDITING("特约商户终审", "013"),
	 ORG_ADD("机构信息录入", "014"),
	 ORG_UPDATE("机构信息变更", "015"),
	 TERM_ADD("添加终端","021"),
	 POWERINFO_DELETE("操作员权限删除","017"),
	 POWERINFO_ADD("操作员权限添加","018"),
	 TERM_SUM("绑定终端序列号","019"),
	 TERM_CLEAR("终端开通","020"),
	 OPERATORS_RESETPWD("密码重置","022"),
	 SETTING_FROZEN("申请结算冻结","023"),
	 SETTING_UNFROZEN("申请结算解冻","024"),
	 SETTING_REVIEWFROZEN("审核结算冻结","025"),
	 SETTING_REVIEWUNFROZEN("审核结算解冻","026"),
	 SETTING_REVIEW("审核结算出款","027"),
	 TERM_FREEZE("终端冻结","028"),
	 TERM_MELT("终端解冻","029"),
	 MODEL_ADD("用户权限模板添加","030"),
	 MODEL_MODIF("用户权限模板修改","031"),
	 MODEL_DELETE("用户模板删除","032"),
	 TER_DIS("机器序列号分配","033"),
	 MERCHANT_BUS_AUDITING("特约商户业务复审","034"),
	 AGENT_UPDATE("代理商信息补全","035"),
	 DIAODAN_APPLY("调单申请","036"),
	 DIAODAN_WANSHAN("调单完善","043"),
	 DIAODAN_REVIEWPASS("调单审批通过","044"),
	 TERM_ALLOT_RECALL("终端绑定撤回","037"),
	 MERINFO_CHANGE_ADDR("商户申请变更营业地址","038"),
	 MERINFO_CHANGE_SETTING("商户申请变更结算信息","039"),
	 MERINFO_CHANGE_RATE("商户申请结算扣率调整","040"),
	 MERINFO_CHANGE_JIAOYI("商户申请交易额度调整","041"),
	 MERINFO_CHANGE_AUDITING("商户申请变更审核","042"),
	 
	 BLACK_ADD("录入黑名单成功","045"),
	 BLACK_STATUS("更改黑名单状态","046"),
	 
	 PROFIT_RULE_ADD("录入分润规则","047"),
	 PROFIT_RULE_DELETE("删除分润规则","048"),
	 
	 MERINFO_CHANGE_ZENGJI("商户增机申请","049"),
	 
	 TERMINAL_LOGOUT("终端注销","050"),
	 
	 MERCHANT_OPEN("特约商户解冻", "051"),
	 MERCHANT_COLESE("特约商户冻结", "052"),
	  MERINFO_CHANGE_ZHUXIAO("商户申请终止合同","053"),
	  
	  TERM_UNBUND("终端序列号解绑","054"),
	 
	 MERINFO_CHANGE_INFO("商户基本信息变更申请","055"),
	 MERINFO_CHANGE_TERM("商户基本信息变更申请","056"),
	 MERINFO_CHANGE_ZONGDUAN("商户申请注销终端","057"),
	 
	 KY_STATUS("风控级别变更","058"),
	 DIAODAN_HANDLE("调单撤销","059"),
	 SN_DELETE("删除SN序列号", "061"),
    
    MERINFO_CHANGE_BASE_INFO("商户申请变更基本信息","060"),
    MERINFO_CHANGE_T1_FEE("商户申请变更T1手续费","061"),
    MERINFO_CHANGE_T0_FEE("商户申请变更T0手续费","062"),
    MERINFO_CHANGE_OPEN_T1("商户申请T1开通","063"),
    MERINFO_CHANGE_OPEN_T0("商户申请T0开通","064"),
	 
     WHITE_ADD("录入白名单成功","065"),
	 WHITE_STATUS("更改白名单状态","066"),
	 RISK_RULE_ADD("添加风控规则","067"),
	 RISK_RULE_UPDATE("修改风控规则","068"),
	 
	MODEL_PROFIT_ADD("代理商分润模板添加","069"),
	MODEL_PROFIT_MODIF("代理商分润模板修改","070"),
	MODEL_PROFIT_DELETE("代理商分润模板删除","071"),
	 MERCHANT_BATCHER_IMPORT("商户批量导入","072"),
	 SN_BATCH_IMPUT("机器序列号号段导入","073"),
	SN_BATCH_DELETE("机器序列号号段删除","074"),
	 
	CHANGE_MERINFO_GRADE("更改商户等级","075"),
	APPLY_SETTLEMENT_MONEY("出款申请","076"),
	FREEZE_MCHT_QK_ADD("添加强扣","077"),
	FREEZE_MCHT_QK_UPDATE("修改强扣","078"),
	PAY_HANG_SETTLEMENT_MONEY("出款挂起","079"),
	PAY_FREE_SETTLEMENT_MONEY("出款释放","080"),
	MERCHANT_CANCEL("特约商户注销", "081"),
	 
	ADD_RISK_RETURN_CODE("添加高危返回码", "082"),
	UPDATE_RISK_RETURN_CODE("变更高危返回码", "083"),
	BCARDFK_DELETE("删除银行卡四要素", "084"),
	 SN_RELEASE("SN释放","085"),
	 SCANCODE_HANDLE("商户入驻绑卡","086"),
	SN_TXT_BATCH_INPUT("机器序列号号段文本框导入","087"),
	UPDATE_RISK_RULE("修改风控规则","088"),
	 INSERT_RISK_RULE("新增特约商户风控规则","089"),
	 DELETE_STOP_MID("注销商户删除证件限制","090"),
	 MERINFO_CHANGE_OPEN_YL("商户申请开通银联扫码","091"),
	 MERINFO_CHANGE_OPEN_ZW("商户申请开通支付宝/微信扫码","092"),
	 MERCHANT_COPEN("特约商户注销后开通","093"),
	 INSERT_STRONG_DEDUC("强扣放款","094"),
	 INSERT_TMP_STRONG_DEDUC("临时强扣","095"),
	 PAY_AGAIN("补付操作","096"),
	 INSERT_ORDER_PROCESS("差错登记","097"),
	 UPDATE_ORDER_PROCESS("差错修改","098"),
	 DELETE_ORDER_PROCESS("差错删除","099"),
	 BATCH_ORDER_PROCESS("差错批导","100"),
	 INSERT_MARGIN_BACK("保证金添加","121"),
	 UPDATE_MARGIN_BACK("保证金修改","122"),
	 INSERT_BIND_MER("绑定商户","123"),
	 
	 ADD_AREA("添加区域","101"),
	UPDATE_AREA("修改区域","102"),
	ADD_ORG("添加机构","103"),
	UPDATE_ARG("修改机构","104"),
	
	 SN_REVOCATION("撤回SN序列号", "105"),
	 
	UPDATE_TERMVER("修改终端版本","106"),
	DELETE_TERMVER("添加终端版本","107"),
	 ACCOUNT_BALANCE_ADD("添加账户余额","108"),
	 ACCOUNT_BALANCE_UPDATE("修改账户余额","109"),
	 MERINFO_CHANGE_YUSHOUQUAN("商户申请注销终端","057"),
	 YSB_TER_DIS("云商宝机器序列号分配","110"),
	 ADD_TERMVER("添加终端版本","111"),
	 YSB_SN_TXT_BATCH_INPUT("云商宝机器序列号号段文本框导入","112"),
	 YSB_TERM_UNBUND("云商宝终端序列号解绑","113"),
	 YSB_SN_BATCH_ALLOT("云商宝SN号段分配","114"),
	
	 YSB_SN_REVOCATION("云商宝撤回SN序列号", "115"),
	 YSB_ALLOT("云商宝实名信息分配","116"),
	 YSB_IDCARD_DATE("云商宝实名身份证有限期修改","117"),
	 YSB_TERM_REPLACE("云商宝终端序列号换机","118"),;
	
	private String code;
	private String name;
	private boolean editAble;
	private boolean enabled;

	private SysLogType( String name,String code) {
		this.code = code;
		this.name = name;
		
	}

	public boolean isEditAble() {
		return editAble;
	}

	public boolean isEnabled() {
		return enabled;
	}

	public String getCode() {
		return code;
	}

	public String getName() {
		return name;
	}

	public static SysLogType valueOfCode(String code) {
		if (StringUtils.isBlank(code)) {
			throw new IllegalArgumentException("SysLogType code " + code
					+ " is blank");
		}
		for (SysLogType ms : values()) {
			if (ms.getCode().equals(code)) {
				return ms;
			}
		}
		throw new IllegalArgumentException("SysLogType code " + code
				+ " is not exist");
	}

}
